import 'package:flutter/material.dart';
import 'package:flutterdemo/animationdemos/animations.dart';
import 'package:flutterdemo/customWidget/loading_dialog.dart';
import 'package:flutterdemo/customWidget/toast.dart';
import 'package:flutterdemo/navigator/page_jump_animations.dart';
import 'package:flutterdemo/pages/tab1/ClipperDemo.dart';
import 'package:flutterdemo/pages/tab1/ThemeDataDemo%20copy.dart';
import 'package:flutterdemo/pages/tab1/ThemeDataDemo.dart';
import 'package:flutterdemo/pages/tab1/WidgetGet.dart';
import 'package:flutterdemo/pages/tab1/applifecycle.dart';
import 'package:flutterdemo/pages/tab1/connectivety.dart';
import 'package:flutterdemo/pages/tab1/custom_sliver_header_usage.dart';
import 'package:flutterdemo/pages/tab1/dialogAndSheet/dialogandsheet.dart';
import 'package:flutterdemo/pages/tab1/drawerdemo.dart';
import 'package:flutterdemo/pages/tab1/flutterassets.dart';
import 'package:flutterdemo/pages/tab1/fullscreen/fullscreen.dart';
import 'package:flutterdemo/pages/tab1/gestureDetector%20copy.dart';
import 'package:flutterdemo/pages/tab1/gestureDetector.dart';
import 'package:flutterdemo/pages/tab1/httpDemoListsPage.dart';
import 'package:flutterdemo/pages/tab1/layout/layout.dart';
import 'package:flutterdemo/pages/tab1/lifecycle.dart';
import 'package:flutterdemo/pages/tab1/maindemo.dart';
import 'package:flutterdemo/pages/tab1/photo_app.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/allscrlldemo.dart';
import 'package:flutterdemo/pages/tab1/search_bar_demo.dart';
import 'package:flutterdemo/pages/tab1/sideslip_test_page.dart';
import 'package:flutterdemo/pages/tab1/tabbar/tabbar.dart';
import 'package:flutterdemo/pages/tab1/thirdpartyapp.dart';
import 'package:flutterdemo/pages/tab1/tool_tips_demo.dart';
import 'package:flutterdemo/pages/tab1/widgets/widgetlist.dart';

class Tab1 extends StatefulWidget {
  Tab1({Key key}) : super(key: key);

  _Tab1State createState() => _Tab1State();
}

class _Tab1State extends State<Tab1> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Tab1'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text('tabBar 系列'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => TabBarDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('dialog and sheet 系列'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => DialogAndSheet(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('toast 自定义'),
            onTap: () {
              HandleToast().showHandleToast('接下来的表示后面的9位');
            },
          ),
          ListTile(
            title: Text('轻量级操作提示 Tooltip'),
            onTap: () {
              Navigator.of(context).push(
                CustomeRouter(
                  ToolTipDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('loading 自定义'),
            onTap: () {
              CustomLoadingDialog(context).show();
              Future.delayed(Duration(seconds: 2), () {
                CustomLoadingDialog(context).hide();
              });
            },
          ),
          ListTile(
            title: Text('滚动widget系列'),
            onTap: () {
              Navigator.of(context).push(
                CustomeRouter(
                  AllscrollDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('ThemeData 主题模式切换'),
            onTap: () {
              Navigator.of(context).push(
                CustomeRouter(
                  ThemeDataDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('ThemeData 主题颜色'),
            onTap: () {
              Navigator.of(context).push(
                CustomeRouter(
                  ThemeTestRoute(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('动画 系列'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => Animations(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('常用 widgets'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => Widgets(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('常用布局组件'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => LayoutWidgets(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('贝塞尔曲线'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => ClipperDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('搜索条实现模拟'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => SearchBarDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('Widget get 组件抽离'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => WidgetGet(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('Drawer 抽屉效果'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => DrawerDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('Drawer 顶部导航，tabbar'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => MainDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('custom_sliver_header_usage'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => CustomSliverHeaderDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('检测手势及处理事件'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => GestureDetectorDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('检测手势及处理事件 -案例'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => GesturePage(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('导入flutter资源文件'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => FlutterAssets(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('如何打开第三方app'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => ThirdPartyApp(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('flutter页面生命周期'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => LifeCycleDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('flutter app 应用生命周期'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => AppLifeCycleDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('flutter 拍照app'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => PhotoApp(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('flutter 列表侧滑'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => SideslipTestPage(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('网络请求'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => HttpDemoListsPage(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('全面屏适配'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => FullScreen(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('监听网络变化'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => ConnectivityDemo(),
                ),
              );
            },
          ),
        ],
      ),
    );
  }
}
